﻿using System;
using SharpSqlAnalyzer.nodes;

namespace SharpSqlAnalyzer.stmt.db2
{
	// Token: 0x020001E2 RID: 482
	public class TDb2RepeatStmt : TBlockSqlStatement
	{
		// Token: 0x0600103F RID: 4159 RVA: 0x0030CBBC File Offset: 0x0030ADBC
		public TDb2RepeatStmt(EDbVendor dbvendor) : base(dbvendor)
		{
			this.sqlstatementtype = ESqlStatementType.sstdb2repeatstmt;
		}

		// Token: 0x06001040 RID: 4160 RVA: 0x0030CBD0 File Offset: 0x0030ADD0
		internal override void buildsql()
		{
		}

		// Token: 0x06001041 RID: 4161 RVA: 0x0030CBD2 File Offset: 0x0030ADD2
		internal override void clear()
		{
		}

		// Token: 0x06001042 RID: 4162 RVA: 0x0030CBD4 File Offset: 0x0030ADD4
		internal override string getasprettytext()
		{
			return "";
		}

		// Token: 0x06001043 RID: 4163 RVA: 0x0030CBDB File Offset: 0x0030ADDB
		internal virtual void iterate(TVisitorAbs pvisitor)
		{
		}

		// Token: 0x06001044 RID: 4164 RVA: 0x0030CBE0 File Offset: 0x0030ADE0
		public override int doParseStatement(TCustomSqlStatement psql)
		{
			if (this.rootNode == null)
			{
				return -1;
			}
			TRepeatSqlNode trepeatSqlNode = (TRepeatSqlNode)this.rootNode;
			base.doParseStatement(psql);
			this.condition = trepeatSqlNode.Condition;
			trepeatSqlNode.Stmts.doParse(this, ESqlClause.unknown);
			for (int i = 0; i < trepeatSqlNode.Stmts.size(); i++)
			{
				this.BodyStatements.add(trepeatSqlNode.Stmts.getStatementSqlNode(i).Stmt);
			}
			return 0;
		}

		// Token: 0x17000302 RID: 770
		// (get) Token: 0x06001045 RID: 4165 RVA: 0x0030CC57 File Offset: 0x0030AE57
		// (set) Token: 0x06001046 RID: 4166 RVA: 0x0030CC5F File Offset: 0x0030AE5F
		public virtual TExpression Condition
		{
			get
			{
				return this.condition;
			}
			set
			{
				this.condition = value;
			}
		}

		// Token: 0x06001047 RID: 4167 RVA: 0x0030CC68 File Offset: 0x0030AE68
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x06001048 RID: 4168 RVA: 0x0030CC78 File Offset: 0x0030AE78
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			this.BodyStatements.accept(v);
			v.postVisit(this);
		}

		// Token: 0x04001391 RID: 5009
		private TExpression condition;
	}
}
